import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'

Vue.use(VueRouter)

const routes = [
	//首页
	{
		path: '/',
		name: 'Home',
		components: {
			default: Home,
			fang60: () => import('../views/fang60'),
			yu100: () => import('../views/yu100')
		}
	},
	//首页
	{
		path: '/Home',
		name: 'Home',
		component: () => import('../views/Home.vue')

	},
	//疯狂的原始人2
	{
		path: '/text',
		name: 'ceshi',
		meta: {
			requireAuth: true  //添加这个字段，表示进入这个路由需要登录的
		},
		component: () => import('../views/common/footer')
	},
	
	
	//电影页
	{
		path: '/about',
		name: 'About',
		component: () => import('../views/About.vue')
	},
	{
		path: '/help',
		name: 'help',
		component: () => import('../views/help.vue')
	},
	//注册页面
	{
		path: '/login',
		name: 'Login',
		component: () => import('../views/login/login.vue')
	},
	//登录页
	{
		path: '/index',
		name: 'index',
		component: () => import('../views/login/index.vue')
	},
	//退出页
	{
		path: '/logout',
		name: 'logout',
		meta: {
			requireAuth: true  //添加这个字段，表示进入这个路由需要登录的
		},
		component: () => import('../views/login/logout.vue')
	},
	//会员中心页
	{
		path: '/user',
		name: 'user',
		meta: {
			requireAuth: true  //添加这个字段，表示进入这个路由需要登录的
		},
		component: () => import('../views/user/user.vue')
	},
	//用户更新页面
	{
		path: '/userUpdate',
		name: 'userUpdate',
		meta: {
			requireAuth: true  //添加这个字段，表示进入这个路由需要登录的
		},
		component: () => import('../views/user/updateUser.vue')
	},
	{
		path: '/fang60',
		name: 'fang60',
		component: () => import('../views/fang60')
	},
	{
		path: '/yu100',
		name: 'yu100',
		component: () => import('../views/yu100')
	},
	//个人信息表
	{
		path: '/personalInformation',
		name: 'personalInformation',
		meta: {
			requireAuth: true  //添加这个字段，表示进入这个路由需要登录的
		},
		component: () => import('../views/user/personalInformation')
	},
	//会员卡 消费记录
	{
		path: '/xiaofeijilu',
		name: 'xiaofeijilu',
		meta: {
			requireAuth: true  //添加这个字段，表示进入这个路由需要登录的
		},
		component: () => import('../views/usercare/xiaofeiCare')
	},
	//会员卡片信息
	{
		path: '/care',
		name: 'care',
		meta: {
			requireAuth: true  //添加这个字段，表示进入这个路由需要登录的
		},
		component: () => import('../views/usercare/care')
	},
	//会员卡充值
	{
		path: '/chongzhi',
		name: 'chongzhi',
		meta: {
			requireAuth: true  //添加这个字段，表示进入这个路由需要登录的
		},
		component: () => import('../views/usercare/chongzhi')
	},
	//支付宝
	{
		path: '/zhifubao',
		name: 'zhifubao',
		meta: {
			requireAuth: true  //添加这个字段，表示进入这个路由需要登录的
		},
		component: () => import('../views/usercare/zhifubao')
	},
	//电影 紧急救援
	{
		path: '/film01',
		name: 'jinjijiuyuan',
		meta: {
			requireAuth: true  //添加这个字段，表示进入这个路由需要登录的
		},
		component: () => import('../views/film/jinjijiuyuan')
	},
	//神奇女侠
	{
		path: '/film02',
		name: '神奇女侠',
		meta: {
			requireAuth: true  //添加这个字段，表示进入这个路由需要登录的
		},
		component: () => import('../views/film/shenqinvxia')
	},
	
	//哆啦A梦
	{
		path: '/film03',
		name: '哆啦A梦',
		meta: {
			requireAuth: true  //添加这个字段，表示进入这个路由需要登录的
		},
		component: () => import('../views/film/film03')
	},
	
	//明天你依然是否爱我
	{
		path: '/film04',
		name: '明天你依然是否爱我',
		meta: {
			requireAuth: true  //添加这个字段，表示进入这个路由需要登录的
		},
		component: () => import('../views/film/film04')
	},
	//疯狂的原始人2
	{
		path: '/film05',
		name: '疯狂的原始人2',
		meta: {
			requireAuth: true  //添加这个字段，表示进入这个路由需要登录的
		},
		component: () => import('../views/film/film05')
	},
	//手机号验证
	{
		path: '/phoneLogin',	
		component: () => import('../views/login/phoneLogin')
	},
	
	
	
]

const router = new VueRouter({
	mode: 'history',
	base: process.env.BASE_URL,
	routes
})

export default router
